package org.rency.ues.engine.manager;

import org.rency.ues.domain.support.Certification;

import java.security.cert.X509Certificate;

/**
 * 证书管理
 *
 * @author: Created by user_rcy@163.com on 2016/07/31.
 * @version: V1.0.0
 * @since JDK 1.8
 */
public interface CertificationManager {

    /**
     * 获取证书载体
     * @param serialNo
     * @return
     */
    public Certification getCertification(String serialNo);

    /**
     * 获取X509证书
     * @param serialNo
     * @return
     */
    public X509Certificate getX509(String serialNo);

    /**
     * 获取最新证书序列号
     * @return
     */
    public String getLastedSerialNo();

    /**
     * 获取最新证书公钥
     * @return
     */
    public String getPubCert();

    /**
     * 刷新证书缓存
     */
    public void refreshAll();

}